package com.xu.cloud.common.conditional;

import org.springframework.context.annotation.Conditional;

import java.lang.annotation.*;

/**
 * 被排除的不生效的 profile, 使用@ExcludeProfile("prod")等效于@Profile("!prod")
 *
 * @author xuguan
 * @since 2025/2/7
 * @see org.springframework.context.annotation.Profile
 */
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Conditional(ExcludeProfileCondition.class)
public @interface ExcludeProfile {

    /**
     * The set of profiles for which the annotated component should not be registered.
     */
    String[] value();
}
